package com.tanhua.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.model.pojo.Analysis;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface AnalysisMapper extends BaseMapper<Analysis> {

    @Select("select sum(num_registered) from tb_analysis")
    Long findCumulativeUsers();

    @Select("select * from tb_analysis where record_date = #{today}")
    Analysis selectByDate(@Param("today") String today);

    @Select("select sum(num_active) from tb_analysis where record_date>#{date}")
    Long findActiveNumber(@Param("date") String date);
}
